/***************************** BEGIN LICENSE BLOCK ***************************

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (the "License"); you may not use this file except in compliance with
 the License. You may obtain a copy of the License at
 http://www.mozilla.org/MPL/MPL-1.1.html
 
 Software distributed under the License is distributed on an "AS IS" basis,
 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 for the specific language governing rights and limitations under the License.
 
 The Original Code is the "EO-SPS Framework".
 
 The Initial Developer of the Original Code is Spotimage S.A.
 Portions created by the Initial Developer are Copyright (C) 2007
 the Initial Developer. All Rights Reserved.
 
 Contributor(s): 
    Alexandre Robin <alexandre.robin@spotimage.fr>
 
******************************* END LICENSE BLOCK ***************************/

package com.spotimage.eosps.test;

import com.vividsolutions.jts.geom.Geometry;
import junit.framework.TestCase;

public class ParamValidation extends TestCase
{
	
	public static boolean check(int p1, int p2)
	{
		if (p1 == p2)
			return true;
		else
			return false;
	}
	
	
	public static boolean check(double p1, double p2)
	{
		if (Double.isNaN(p1))
		{
			if (Double.isNaN(p2))
				return true;
			else
				return false;
		}
		
		if (p1 == p2)
			return true;
		else
			return false;
	}
	
	
	public static boolean check(Object p1, Object p2)
	{
		if (p1 == null)
		{
			if (p2 == null)
				return true;
			else
				return false;
		}
		
		if (p1.equals(p2))
			return true;
		else
			return false;
	}
	
	
	public static boolean check(Geometry p1, Geometry p2)
	{
		if (p1 == null)
		{
			if (p2 == null)
				return true;
			else
				return false;
		}
		
		if (p1.equals(p2))
			return true;
		else
			return false;
	}
	
}
